using System;
using System.Collections.Generic;
using System.Linq;
using SuCasa.Infrastructure;

namespace SuCasa.DataAccess{
    public static class FakeDb{
        public static readonly IEnumerable<MemberType> AllMemberTypes = new List<MemberType>
            {
                //fill these in with real ones if needed
                new MemberType
                    {
                        IsActive = true,
                        MemberTypeDesc = "Teacher",
                        MemberTypeId = 1
                    },
                new MemberType
                    {
                        IsActive = true,
                        MemberTypeDesc = "Teacher",
                        MemberTypeId = 2
                    },
                new MemberType
                    {
                        IsActive = true,
                        MemberTypeDesc = "Teacher",
                        MemberTypeId = 3
                    },
                new MemberType
                    {
                        IsActive = true,
                        MemberTypeDesc = "Teacher",
                        MemberTypeId = 4
                    },
                new MemberType
                    {
                        IsActive = true,
                        MemberTypeDesc = "Teacher",
                        MemberTypeId = 5
                    },
                new MemberType
                    {
                        IsActive = true,
                        MemberTypeDesc = "Teacher",
                        MemberTypeId = 6
                    }
            };

        public static readonly IEnumerable<CallLog> AllCallLogs = new List<CallLog>
            {
                new CallLog
                    {
                        CallLogId = 1,
                        DateTime = DateTime.Now,
                        Note = "note1",
                        ReceivedByMemberId = 2
                    },
                new CallLog
                    {
                        CallLogId = 2,
                        DateTime = DateTime.Now,
                        Note = "note2",
                        ReceivedByMemberId = 2
                    },
                new CallLog
                    {
                        CallLogId = 3,
                        DateTime = DateTime.Now,
                        Note = "note3",
                        ReceivedByMemberId = 2
                    },
            };

        public static readonly IEnumerable<Course> AllCourses = new List<Course>
            {
                new Course
                    {
                        Capacity = 30,
                        CourseId = 1,
                        Description = "a course",
                        InstructorId = 13,
                        IsDaycare = false,
                        Location = "blah",
                        MaximumAge = 12,
                        MinimumAge = 8,
                        Name = "Spanish I",
                        ScheduleNotes = "schedule notes",
                        Students = new List<Member>
                            {
                                new Member
                                    {
                                        MemberId = 1,
                                        Address1 = "blah",
                                        Address3 = "blah",
                                        Address2 = "blah",
                                        AssociatedChurch = "Church",
                                        CellPhone = "234235324",
                                        City = "Memphis",
                                        CountryOfOrigin = "US",
                                        CurrentSchoolNotes = "school notes",
                                        State = "TN",
                                        MemberTypeId = 1
                                    },
                                new Member
                                    {
                                        MemberId = 2,
                                        Address1 = "blah",
                                        Address3 = "blah",
                                        Address2 = "blah",
                                        AssociatedChurch = "Church",
                                        CellPhone = "234235324",
                                        City = "Memphis",
                                        CountryOfOrigin = "US",
                                        CurrentSchoolNotes = "school notes",
                                        State = "TN",
                                        MemberTypeId = 3
                                    }
                            }
                    },
                new Course
                    {
                        Capacity = 30,
                        CourseId = 2,
                        Description = "a course",
                        InstructorId = 3,
                        IsDaycare = false,
                        Location = "blah",
                        MaximumAge = 12,
                        MinimumAge = 8,
                        Name = "Spanish II",
                        ScheduleNotes = "schedule notes",
                    }
            };

        public static readonly IEnumerable<Member> AllMembers = new List<Member>
            {
                new Member
                    {
                        MemberId = 1,
                        Address1 = "blah",
                        Address3 = "blah",
                        Address2 = "blah",
                        AssociatedChurch = "Church",
                        CellPhone = "234235324",
                        City = "Memphis",
                        CountryOfOrigin = "US",
                        CurrentSchoolNotes = "school notes",
                        Courses = AllCourses.ToList(),
                        State = "TN",
                        MemberTypeId = 1
                    },
                new Member
                    {
                        MemberId = 2,
                        Address1 = "blah",
                        Address3 = "blah",
                        Address2 = "blah",
                        AssociatedChurch = "Church",
                        CellPhone = "234235324",
                        City = "Memphis",
                        CountryOfOrigin = "US",
                        CurrentSchoolNotes = "school notes",
                        Courses = AllCourses.ToList(),
                        State = "TN",
                        MemberTypeId = 3
                    }
            };

        public static readonly IEnumerable<Session> AllSessions = new List<Session>
            {
                new Session
                    {
                        CourseId = 1,
                        Attended = true,
                        Grade = 32,
                        Homework = true,
                        SessionId = 1,
                        StudentId = 1,
                        Timestamp = DateTime.Now
                    },
                new Session
                    {
                        CourseId = 1,
                        Attended = true,
                        Grade = 0,
                        Homework = true,
                        SessionId = 2,
                        StudentId = 1,
                        Timestamp = DateTime.Now
                    },
                new Session
                    {
                        CourseId = 1,
                        Attended = true,
                        Grade = 0,
                        Homework = true,
                        SessionId = 3,
                        StudentId = 1,
                        Timestamp = DateTime.Now
                    },
                new Session
                    {
                        CourseId = 1,
                        Attended = false,
                        Grade = 0,
                        Homework = false,
                        SessionId = 4,
                        StudentId = 1,
                        Timestamp = DateTime.Now
                    }
            };
    }
}